package com.yj.suncity.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

public class AdvDetailBean {
	private String success;// ": "1",
	private String msg;// ": "获取信息成功",
	private JSONObject data;// ": {
	private String entname = "";// ": "山西科技公",
	private String ent_jianjie = "";// ": "专门坑蒙拐骗",
	private String ent_subname = "";// ": "",
	private String ent_address = "";// ": "山西省太原市省政府院内喊李",
	private String ent_contact = "";// ": "李刚的儿",
	private String ent_contact_tel = "";// ": "18899990003",
	private String ent_weblink = "";// ": "",
	private String legal_person = "";// ": "李",
	private String ent_logo = "";// ": "",
	private String userid = "";// ": "2c202b46-c966-4bb9-beb3-3fedc1780b19",
	private String sharegivenum = "";// ": "15",
	private String hold_num = "";// : "0",
	private String see_num = "";// ": "1",
	private String share_num = "";
	private String dhsy_num = "";// ": "1",
	private String dg_num = "";// ": "1",
	private String adv_surplus_num = "";// ": "0",
	private String give_num = "";// ": "10",
	private String offer_give_num = "";// ": "0",
	private String dhgoodssurplus = "";// ": "0",
	private String dggoodssurplus = "";// ": "0",
	private String activitynum = "";// ": "1"
	private String img = "";
	private List<AdvGoodsBean> goods = new ArrayList<AdvGoodsBean>();// ": [

	public AdvDetailBean(JSONObject json) {
		this.success = json.optString("success");
		this.msg = json.optString("msg");
		this.data = json.optJSONObject("data");
		if (data != null) {
			this.entname = data.optString("entname");
			this.ent_jianjie = data.optString("ent_jianjie");
			this.ent_subname = data.optString("ent_subname");
			this.ent_address = data.optString("ent_address");
			this.ent_contact = data.optString("ent_contact");
			this.ent_contact_tel = data.optString("ent_contact_tel");
			this.ent_weblink = data.optString("ent_weblink");
			this.legal_person = data.optString("legal_person");
			this.ent_logo = data.optString("ent_logo");
			this.userid = data.optString("userid");
			this.sharegivenum = data.optString("sharegivenum");
			this.hold_num = data.optString("hold_num");
			this.see_num = data.optString("see_num");
			this.share_num = data.optString("share_num");
			this.dhsy_num = data.optString("dhsy_num");
			this.dg_num = data.optString("dg_num");
			this.adv_surplus_num = data.optString("adv_surplus_num");
			this.give_num = data.optString("give_num");
			this.offer_give_num = data.optString("offer_give_num");
			this.dhgoodssurplus = data.optString("dhgoodssurplus");
			this.dggoodssurplus = data.optString("dggoodssurplus");
			this.activitynum = data.optString("activitynum");
			this.img = data.optString("img");
			JSONArray array = data.optJSONArray("goods");
			if (array != null) {
				for (int i = 0; i < array.length(); i++) {
                    JSONObject item=array.optJSONObject(i);
                    if (item!=null) {
						this.goods.add(new AdvGoodsBean(item));
					}
				}
			}

		}
	}
	public String getShare_num() {
		return share_num;
	}
	public String getSuccess() {
		return success;
	}

	public String getMsg() {
		return msg;
	}

	public JSONObject getData() {
		return data;
	}

	public String getEntname() {
		return entname;
	}

	public String getEnt_jianjie() {
		return ent_jianjie;
	}

	public String getEnt_subname() {
		return ent_subname;
	}

	public String getEnt_address() {
		return ent_address;
	}

	public String getEnt_contact() {
		return ent_contact;
	}

	public String getEnt_contact_tel() {
		return ent_contact_tel;
	}

	public String getEnt_weblink() {
		return ent_weblink;
	}

	public String getLegal_person() {
		return legal_person;
	}

	public String getEnt_logo() {
		return ent_logo;
	}

	public String getUserid() {
		return userid;
	}

	public String getSharegivenum() {
		return sharegivenum;
	}

	public String getHold_num() {
		return hold_num;
	}

	public String getSee_num() {
		return see_num;
	}

	public String getDhsy_num() {
		return dhsy_num;
	}

	public String getDg_num() {
		return dg_num;
	}

	public String getAdv_surplus_num() {
		return adv_surplus_num;
	}

	public String getGive_num() {
		return give_num;
	}

	public String getOffer_give_num() {
		return offer_give_num;
	}

	public String getDhgoodssurplus() {
		return dhgoodssurplus;
	}

	public String getDggoodssurplus() {
		return dggoodssurplus;
	}

	public String getActivitynum() {
		return activitynum;
	}

	public List<AdvGoodsBean> getGoods() {
		return goods;
	}

	public String getImg() {
		return img;
	}

}
